import java.util.Scanner;

/**
 * @author gao
 * @date 2025/11/1 13:51
 */

public class Main {

    public static int reverseThreeDigit(int number) {
        StringBuffer buffer = new StringBuffer();
        while (number > 0) {
            int n = number % 10;
            number /= 10;
            buffer.append(n);
        }
        return Integer.parseInt(buffer.toString());
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            System.out.println(reverseThreeDigit(n));
        }
    }
}